package top.yiwyn.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Options;
import org.springframework.stereotype.Component;
import top.yiwyn.domain.Arcticle;
import top.yiwyn.domain.Tag;

import java.io.Serializable;
import java.util.List;

@Component
public interface ArcticleMapper extends BaseMapper<Arcticle> {

    @Override
    int insert(Arcticle arcticle);


    @Override
    Arcticle selectById(Serializable id);


    String getArcticleTitleFromId(String id);


    //    分页查询方法
    IPage<Arcticle> selectPage(Page<Arcticle> page);

    List<Tag> selectAllTagById(int id);

}
